import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import router from './router'
import store from './vuex/store'
import App from './App'
import Search from './components/Search'
import System from './components/System'
import SchoolShow from './components/SchoolShow'
import SchoolIndex from './components/SchoolIndex'
import Tell from './components/Tell'
import Renwu from './components/Renwu'
import Means from './components/Means'
import AddPerson from './components/AddPerson'

// axios.defaults.withCredentials=true;

Vue.config.productionTip = false
Vue.prototype.$http = axios
Vue.use(VueAxios, axios)
// Vue.use(VueRouter)

// const routes = [
//   { path: '/', component: SchoolIndex },
//   { path: '/System', component: System },
//   { path: '/Index', component: Index },
//   { path: '/Tell', component: Tell },
//   { path: '/Renwu', component: Renwu },
//   { path: '/Tell', component: Tell },
//   { path: '/Means', component: Means },
//   { path: '/AddPerson', component: AddPerson },
//   { path: '/edit/:index', component: AddPerson ,name: 'edit'},
//   { path: '/show/:id', component: SchoolShow, name: 'show' }
// ]

// const router = new VueRouter({
//   routes // (缩写) 相当于 routes: routes  实例化路由
// })

new Vue({
  el: '#app',
  router, // 使用路由
  store,
  components: { App },
  template: '<App/>',
})
